package com.enterpriseDigitalPlatform.util;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class Asycfunc {

    // @Autowired
    // private OperationLogMapper operationLogMapper;

    // todo 异步记录日志
    // @Async("asyncExecutor")
    // public void addLog(String beizhu, long res, String tableName, Integer tableId, RequestInfoDTO requestInfoDto) {
    //     Map<String, Object> reqUser = requestInfoDto.getJwtData();
    //     OperationLog operationLog = new OperationLog();
    //     operationLog.setBeizhu(beizhu);
    //     operationLog.setAdminId((Integer) reqUser.get("id"));
    //     operationLog.setRes(String.valueOf(res));
    //     operationLog.setIp(requestInfoDto.getIp());
    //     operationLog.setVisitorId(reqUser.get("visitorId").toString());
    //     operationLog.setTimetag(DateTimeUtil.getNowTimeStamp());
    //     operationLog.setTableName(tableName);
    //     operationLog.setTableId(tableId);
    //     operationLogMapper.addData(operationLog);
    // }
}
